package org.csmz.class2333.innerclass;

class DeviceController {
    private String controllerName;
    public DeviceController(String controllerName){
        this.controllerName = controllerName;
    }
    public void connectToDevice(){
        System.out.println("设备控制其成功连接到设备");
    }
    class Device {
        private String deviceName;
        public Device(String deviceName){
            this.deviceName = deviceName;
        }
        public void powerOn(){
            System.out.println(controllerName +"控制" +deviceName +"开机！");
        }
        public void powerOff(){
            System.out.println(controllerName +"控制" +deviceName +"关机！");
        }
    }
}
